Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

Latest commit

 

History

History
11 lines (7 loc) · 344 Bytes

3.7.11 - Coroutine/Socket->getpeername.md

File metadata and controls

11 lines (7 loc) · 344 Bytes

Coroutine\Socket->getpeername

获取socket的对端地址和端口信息,仅用于SOCK_STREAM类型有连接的socket。此方法没有协程调度开销。

function Coroutine\Socket->getpeername() | array;
  • 调用成功返回,包含addressport的数组
  • 调用失败返回false,并设置errCode属性